package com.lysj.admin.common.order.feign;

import com.lysj.admin.common.food.domain.OrderVo;
import com.lysj.admin.common.order.domain.OrderItemAndFoodWeight;
import com.lysj.admin.common.order.domain.OrderModifyVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @ Author ：drj.
 * @ Date  ：Created in 15:10 2019/4/1
 * @ Description:
 **/

public interface OrderServiceFeign {

    //创建订单
    @PostMapping("/order/management/create_order")
    Map<String, Object> createOrder(@RequestBody OrderVo orderVo);

    //加菜
    @PostMapping("/order/management/order_modify")
    List<OrderItemAndFoodWeight> orderModify(@RequestBody OrderModifyVo orderModifyVo);

    //称重修改orderItem
    @PostMapping("/order/management/order_item_modify")
    boolean orderIemModify(@RequestParam(value = "orderItemId") String orderItemId,
                           @RequestParam(value = "tolPrice") BigDecimal tolPrice,
                           @RequestParam(value = "doway") String doway);

    //查询用户正在就餐的订单id
    @GetMapping("/order/management/query_cus_place_order_id")
    String queryCusPlaceOrderId(@RequestParam(value = "customerId") String customerId);

    //正在就餐的餐桌进行换桌
    @PostMapping("/order/management/change_desk")
    boolean changeDesk(@RequestParam(value = "sourceDeskId") String sourceDeskId,
                       @RequestParam(value = "targetDeskId") String targetDeskId);
}


